package com.imooc.pan.stream.core;

import java.util.Map;

/**
 * 消息发送者顶级接口
 */
public interface IStreamProducer {

    /**
     * 发送消息   通过哪个channel往外发deploy
     *
     */
    boolean sendMessage(String channelName, Object deploy);

    /**
     * 发送消息   通过哪个channel往外发deploy,消息头是headers
     *
     */
    boolean sendMessage(String channelName, Object deploy, Map<String, Object> headers);

}
